﻿<div class="login-container animated fadeInDown" ng-controller="PinCodeController">
    <div class="loginbox bg-white">
        <div class="logobox">
            <p class="text-center">
                <a ui-sref="app.dashboard">
                    <img src="assets/img/logo_login.png" width="150" />
                </a>                
            </p>
        </div>
        <h3 class="text-center">Pincode</h3>
        <form name="simpleForm" method="post" class="form-horizontal bv-form" novalidate="novalidate">
            <div class="loginbox-textbox" ng-class="{ 'has-error' : simpleForm.Pincode.$invalid && !simpleForm.Pincode.$pristine }">
                <input type="text" class="form-control" placeholder="Pincode" ng-model="Pincode" required />                
            </div>
            <div class="loginbox-submit">
                <button class="btn btn-primary btn-block" ng-disabled="!simpleForm.$valid" ng-click="doResetPass(Pincode)">Reset Password</button>
                <button class="btn btn-primary btn-block" ng-show="showbtnResent" ng-click="doResentPinCode()">Resend PinCode</button>                
            </div>
        </form>
            <!--Success Modal Templates-->
            <script type="text/ng-template" id="WarningModal">
                <div class="modal-header">
                    <i class="glyphicon glyphicon-check"></i>
                </div>
                <div class="modal-title">{{title}}</div>
                <div class="modal-body">
                    {{ messeger }}
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-success" ng-click="ok()">OK</button>
                    <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
                </div>
            </script>
            <!--End Success Modal Templates-->
            <!--Success Modal Templates-->
        <script type="text/ng-template" id="PasswordReset">
            <form name="ResetForm" method="post" class="form-horizontal bv-form" novalidate="novalidate">
                <div class="modal-header">
                    <h3 class="modal-title">Password Reset</h3>
                </div>
                <div class="modal-body">                   
                    
                    <div class="loginbox-textbox" ng-class="{ 'has-error' : ResetForm.Password.$invalid && !ResetForm.Password.$pristine }">
                        <label>Password</label>
                        <input type="password" class="form-control" ng-minlength="6"  ng-model="Password" required />
                    </div>
                    <div class="loginbox-textbox" ng-class="{ 'has-error' : ResetForm.Password2.$invalid && !ResetForm.Password2.$pristine }">
                        <label>Confirm Password</label>
                        <input type="password" class="form-control" ng-minlength="6"  ng-model="Password2" required />
                    </div>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-blue" ng-disabled="!ResetForm.$valid" ng-click="doPasswordReset(Password)">Save</button>
                    <button class="btn btn-warning" ng-click="cancel()">Cancel</button>
                </div>
            </form>
        </script>
        <!--End Success Modal Templates-->

</div>
</div>